<template>
	<view class="video-player">
		<video id="myVideo" class="video" :controls="false" :src="url" :loop="true" :autoplay="autoplay"
			controls></video>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	const props = defineProps({
		url: {
			type: String,
			default: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4'
		}
	});
	const autoplay = ref(true)
</script>

<style lang="scss" scoped>
	.video-player {
		height: 100vh;
		width: 100vw;
	}

	.video {
		height: 100%;
		width: 100%;
		z-index: 1;
	}
</style>